{include file='worklog/base/header'}
<body class="gray-bg">
<div class="row">

    <div class="col-sm-12">

        <div class="wrapper wrapper-content">
            <div class="row animated fadeInRight">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">

                        <div class="" id="ibox-content">
                            <div class="vertical-container">
                                <button class="btn btn-primary" id="add_diary" type="submit"><i class="fa fa-plus"> 添加日志</i></button>
                                <button class="btn btn-primary" id="export" type="submit"><i class="fa fa-sign-out"> 导出日志</i></button>
                            </div>
                            <div id="vertical-timeline" class="vertical-container light-timeline">
                                {volist id='work' name='work_data'}
                                <div class="vertical-timeline-block">
                                    <div class="vertical-timeline-icon
                                    {if $work.type==1}navy-bg{/if}
                                    {if $work.type==2}blue-bg{/if}
                                    {if $work.type==3}yellow-bg{/if}
                                    {if $work.type==4}lazur-bg{/if}
                                    {if $work.type==5}red-bg{/if}
                                    ">
                                        <i class="fa
                                        {if $work.type==1}fa-users{/if}
                                        {if $work.type==2}fa-eyedropper{/if}
                                        {if $work.type==3}fa-wrench{/if}
                                        {if $work.type==4}fa-briefcase{/if}
                                        {if $work.type==5}fa-file-text-o{/if}
                                        "></i>
                                    </div>

                                    <div class="vertical-timeline-content">
                                        <h2>
                                            {if $work.type==1}会议{/if}
                                            {if $work.type==2}实验课{/if}
                                            {if $work.type==3}维修设备{/if}
                                            {if $work.type==4}出差{/if}
                                            {if $work.type==5}考试管理{/if}
                                        </h2>
                                        <p>
                                            {$work.content}
                                        </p>

                                        <span class="vertical-date">
                                            <small>{$work.record_time}</small>
                                        </span>
                                    </div>
                                </div>
                                {/volist}
                                <div class="text-center">
                                    {$work_data|raw}
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
{include file='worklog/base/footer'}
<script>
    var $add=$('#add_diary');
    $add.on('click',function (){
        layer.open({
            type: 2,
            title: '记录日志',
            shadeClose: false,
            shade: 0.8,
            area: ['60%', '90%'],
            content: 'add_work_diary.html',
            end:function (){
                location.reload();
            }
        });
    })
    $('#export').on('click',function (){
        window.location.replace('export_work_diary.html');
    })
</script>
<script src="__PUBLIC__/home/js/layui/layui.all.js"></script>
